package com.cskaoyan.controller.wxgoods;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.vo.wxgoods.CatalogCurrentVo;
import com.cskaoyan.bean.vo.wxgoods.CatalogIndexVo;
import com.cskaoyan.service.wxgoods.WxCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Ajun de BBC
 * @Date 2022/7/20 22:39
 * @Version 1.5
 */

@RequestMapping("wx/catalog")
@RestController
public class WxCatalogController {

    @Autowired
    WxCatalogService wxCatalogService;

    @RequestMapping("index")
    public BaseRespVo catalogIndex(){
        CatalogIndexVo catalogIndexVo = wxCatalogService.catalogIndex();
        return BaseRespVo.ok(catalogIndexVo,"成功",0);
    }

    @RequestMapping("current")
    public BaseRespVo catalogCurrent(Integer id){
        CatalogCurrentVo catalogCurrentVo = wxCatalogService.catalogCurrent(id);
        return BaseRespVo.ok(catalogCurrentVo,"成功",0);
    }

}
